﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Web;

using ChatForum.DataContract;

namespace ChatForum.SOAP.ServiceContract
{
    [ServiceContract]
	public interface IAccountService
    {
        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        void RegisterUser(UserDTO user);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        void Login(string userId, string password);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        void Logout(string userId);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        IEnumerable<UserDTO> GetAllUser();

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        UserDTO GetUser(string userId);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        void ChangePassword(string userId, string oldPassword, string password);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        void BlockUser(UserDTO user);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
        void UnblockUser(UserDTO user);

        [OperationContract]
        [FaultContract(typeof(ChatForumFault))]
		void ModifyAccountDetails(UserDTO user);

		[OperationContract]
		[FaultContract(typeof(ChatForumFault))]
		void SendMessage(UserDTO user, string subject, string body);
    }
}
